package org.linlinjava.litemall.admin.service;

import org.linlinjava.litemall.db.dao.LitemallBrandAppendMapper;
import org.linlinjava.litemall.db.dao.LitemallContactMapper;
import org.linlinjava.litemall.db.domain.LitemallBrandAppend;
import org.linlinjava.litemall.db.domain.LitemallBrandAppendExample;
import org.linlinjava.litemall.db.domain.LitemallContact;
import org.linlinjava.litemall.db.domain.LitemallContactExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Service
public class AdminContactService {
    @Resource
    private LitemallContactMapper contactMapper;


    public void addContact(LitemallContact litemallContact) {
        contactMapper.insertSelective(litemallContact);
    }

    public void updateContact(LitemallContact litemallContact) {
        contactMapper.updateByPrimaryKeySelective(litemallContact);
    }


    public LitemallContact findAll() {
        LitemallContactExample example = new LitemallContactExample();
        return contactMapper.selectOneByExampleWithBLOBs(example);
    }
}
